import request from '@/utils/request.js'
// 注册
export const registerApi = ({ username, password, repassword }) => {
  // 将Promise对象返回
  return request({
    url: '/api/reg',
    method: 'POST',
    data: {
      username,
      password,
      repassword
    }
  })
}

// 登录
export const loginApi = ({ username, password }) => {
  return request({
    url: '/api/login',
    method: 'POST',
    data: {
      username,
      password
    }
  })
}
